// pages/address/address.js
Page({
    data:{
        useId:'',
        address:[{
            user_name:'',
            phone:'',
            address:'辽宁省大连市金州区大连民族大学',
            order_id:'false'
        }]
    },
    queryAddress(){
        var that = this; 
        var app = getApp();
        that.data.useId = app.data.useId;
        wx.request({
            url: 'http://localhost:8080/address/search?useId='+that.data.useId,
            method:'GET',
            header:{
                'content-type':'application/json'
            },
            success:function(res){
                console.log(res);
                that.setData({
                    address:res.data.data
                })
                
                console.log(that.data.address)
            }
        })
    },
    onShow(){
        this.queryAddress();
    }
})